import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Main',
    component: () => import(/* webpackChunkName: "Main" */ '../views/Main.vue'),
    children: [
      {
        path: "/categories/create", component: () => import(/* webpackChunkName: "CategoriesEdit" */ '../views/CategoriesEdit.vue'), meta: { isPublic: true }

      },
      {
        path: "/categories/list", component: () => import(/* webpackChunkName: "CategoriesList" */ '../views/CategoriesList.vue')
      },
      {
        path: "/categories/upload", component: () => import(/* webpackChunkName: "Upload" */ '../views/Upload.vue')
      },
      {
        path: "/categories/edit", component: () => import(/* webpackChunkName: "Edit" */ '../views/Edit.vue')
      },
      {
        path: "/categories/AdminUser", component: () => import(/* webpackChunkName: "AdminUser" */ '../views/AdminUser.vue')
      }

    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
